package com.wench.spring5.test_demo;

import com.wench.spring5.service.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author epro
 * @date 2021/12/31 14:32
 */
public class BeanTest {

    ApplicationContext context = new ClassPathXmlApplicationContext("bean2.xml");

    @Test
    public void testAdd() {
        UserService userService = context.getBean("userService", UserService.class);
        userService.add();
    }
}
